#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int b, c, d, e;
	int a = 0;
	for (a = 100;a <= 999; a++)
	{
		b = a % 10;
		c = (a / 10) % 10;
		d = a / 100;
		e = ( b * b * b + c * c * c + d * d * d);
		if ( a == e )
			printf("%d是水仙花数\n", a);
	}
	printf("凌祖琪上机打卡");
	return 0;
}
//自幂数
#include<math.h>
int main()
{
	int i = 0;
	for (i = 0;i <= 100000;i++)
	{
		int n = 1;
		int temp = i;
		//计算位数
		while (temp / 10)
		{
			n++;
			temp /= 10;
		}
		temp = i;
		int sum = 0;
		//计算i的每一位的n次方之和
		while (temp)
		{
			sum += (int)pow(temp % 10, n);
			temp /= 10;
		}
		//判断兵输出
		if (sum == i)
		{
			printf("%d ", sum);
		}
	}
}